feat: Create native Android AI companion app (AndroidAgent)#1
feat: Create native Android AI companion app (AndroidAgent)#1magicalmutation-coder with Copilot wants to merge 4 commits into
Conversation
- MainActivity with bottom navigation (Home, Chat, Files, Settings) - CompanionFaceView: custom Canvas-drawn animated robot face with mood expressions - 5 robot agents: ARIA (main companion), MAXIE (messaging), FELIX (files), NEXUS (web), MEMO (memory) - AgentManager singleton with LiveData status updates for all robots - Room database: Message, Memory, AgentContact, LLMConfig entities with DAOs - LLM integration: OllamaProvider (streaming) and OpenAICompatibleProvider - Pre-configured presets: Ollama, LM Studio, LLaMA.cpp, Jan.ai, GPT4All - Chat UI with bubble messages, typing indicator, per-agent emoji/name display - File manager with workspace directory, create/read/delete, swipe-to-refresh - Settings: LLM config (all fields + test connection + fetch models), auto-reply toggles - Contacts auto-reply management with per-contact toggle - AgentNotificationListenerService: monitors WhatsApp, email, SMS notifications - AgentSmsReceiver: intercepts SMS, routes to MAXIE, auto-replies via LLM if configured - Persistent memory system (key/value/category/importance) injected into LLM context - Material Design 3 dark theme with robot-blue accent color palette - All permissions declared: INTERNET, READ/RECEIVE/SEND_SMS, READ_CONTACTS, CAMERA, RECORD_AUDIO Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: magicalmutation-coder <246345154+magicalmutation-coder@users.noreply.github.com>
… color hex casing - SettingsFragment: use viewLifecycleOwner.lifecycleScope instead of GlobalScope for the clear-memories coroutine, properly tying it to the fragment lifecycle - Remove unused ViewModel/viewModels imports from SettingsFragment - colors.xml: fix hex casing #CCffffff -> #CCFFFFFF Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: magicalmutation-coder <246345154+magicalmutation-coder@users.noreply.github.com>
Agent-Logs-Url: https://github.com/magicalmutation-coder/AndroidAgent/sessions/70e6cbaf-2536-46e5-81c3-e4a687a6090e Co-authored-by: magicalmutation-coder <246345154+magicalmutation-coder@users.noreply.github.com>
|
@copilot ok let me see it then |
The full source is in this PR and ready to build! Here's what you'll see when you run it: To build and install: git clone <repo> && cd AndroidAgent
# Open in Android Studio → click Run ▶
# OR via command line:
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apkWhat the app looks like: 🏠 Home screen — ARIA's animated metallic robot face at the top, blinking eyes that wander around, mood-driven mouth expression. Below it are 4 robot status cards (MAXIE, FELIX, NEXUS, MEMO) in a 2-column grid showing their current activity. A mic FAB sits bottom-right. 💬 Chat screen — Dark chat bubbles, user messages right-aligned in blue, ARIA's responses left-aligned in dark grey with robot emoji. "🤖 ARIA is thinking..." typing indicator appears while the LLM responds. Mic + camera buttons on the input bar. 📁 Files screen — SwipeRefresh list of your workspace files with name, size, date. FAB to create new text files, long-press to delete, tap to read. ⚙️ Settings → LLM Config — Provider spinner (Ollama/LM Studio/LLaMA.cpp/Jan.ai/GPT4All) auto-fills the base URL. "Fetch" button pulls available models from the server. Temperature slider, system prompt editor, Test Connection button. First-time setup:
Note: For SMS/WhatsApp monitoring, grant Notification Access in Android system settings when prompted. |
Bootstrap a full native Android AI companion app from an empty repo. The app connects to a local LLM, monitors messages, and exposes a robot-themed agent UI with persistent memory.
Architecture
BottomNavigationView(Home / Chat / Files / Settings)LLM Integration (
llm/)LLMProviderinterface:chat()+listModels()OllamaProvider— streaming NDJSON (/api/chat)OpenAICompatibleProvider—/v1/chat/completionsfor LM Studio, LLaMA.cpp, Jan.ai, GPT4AllLLMManagersingleton routes to the active provider and injectsMemoryrows as contextRobot Agents (
agents/)Five named agents expose
LiveData<String>status observed by the home screen:CompanionFaceViewexpressionUI
CompanionFaceView— custom Canvas view: metallic rounded head, blinking eyes with wandering pupils, mood-driven mouth, antenna; all driven byValueAnimatorChatFragment/ChatAdapter— dual-ViewHolder message bubbles (user / agent), typing indicatorFilesFragment— workspace CRUD withSwipeRefreshLayoutLLMConfigFragment— provider spinner with pre-filled base URLs, Fetch Models button, temperatureSlider, Test ConnectionData Layer (
data/)Room DB with four entities:
Message,Memory(key/value/category/importance 1–10),AgentContact(per-contact auto-reply config),LLMConfigServices
AgentSmsReceiver—BroadcastReceiverforSMS_RECEIVED→ MAXIEAgentNotificationListenerService— watches WhatsApp, Gmail, Outlook, Samsung/Google SMS packagesBug fix
ChatViewModelusedobserveForeverwithout cleanup; observer is now stored and removed inonCleared().Original prompt